package com.cmc.cloud.cmclink.doc.api.document.req.si;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * VMG信息创建 Request VO
 *
 * @author codegen
 */
@Schema(description = "管理后台 - VMG信息创建 Request VO")
@Data
public class BlnoVgmReqDto {

    @Schema(description = "港口")
    @NotBlank(message = "{vgmCreateReqVO.currentPort.notBlank}")
    private String currentPort;

    @Schema(description = "船名")
    @NotBlank(message = "{vgmCreateReqVO.vesselCode.notBlank}")
    private String vesselCode;

    @Schema(description = "航次")
    @NotBlank(message = "{vgmCreateReqVO.voyage.notBlank}")
    private String voyage;

    @Schema(description = "提单号")
    @Length(max = 50, message = "{vgm.blno.length}")
    private String blNo;

    @Schema(description = "箱号", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "{vgm.cntrno.notblank}")
    @Length(max = 12, message = "{vgm.cntrno.length}")
    private String cntrNo;

    @Schema(description = "重量")
    private BigDecimal weight;

    @Schema(description = "称重方式")
    @Length(max = 3, message = "{vgm.typecode.length}")
    private String typeCode;

    @Schema(description = "称重地点")
    @Length(max = 100, message = "{vgm.address.length}")
    private String address;

    @Schema(description = "称重时间")
    private String time;

    @Schema(description = "验证签名")
    @Length(max = 100, message = "{vgm.signature.length}")
    private String signature;

    @Schema(description = "数据来源网厅web 、edi、api、手动manual")
    @Length(max = 20, message = "{vgm.datasource.length}")
    private String dataSource;

    @Schema(description = "文件id", example = "4508")
    private Long fileId;

    @Schema(description = "Vgm称重时间(网厅专用，勿动)", hidden = true)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
    private LocalDateTime vgmTime;
}
